if(!jsx3.lang.Class.forName("ux.cdb.admin.system.school.builder.step3.BankInfo")) {
	jsx3.lang.Class.defineClass("ux.cdb.admin.system.school.builder.step3.BankInfo",
			ux.megatron.gui.WizardPanel,
			null,
			function (block) {
				/**
				 * instance initializer
				 * @param strName {String} unique name distinguishing this object from all other JSX GUI objects in the JSX application
				 * @param vntLeft {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
				 * @param vntTop {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
				 * @param vntWidth {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
				 * @param vntHeight {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
				 * @param strHTML {String} Text/HTML markup to place in the jsx3.gui.Block instance
				 */
				block.prototype.init = function(strName, vntLeft, vntTop, vntWidth, vntHeight, strHTML) {
					//call constructor for super class (the super expects the name of the object and the function that it is an instance of)
					this.jsxsuper(strName, vntLeft, vntTop, vntWidth, vntHeight, strHTML);
				};

				block.prototype.initialize = function(msg) {
					//this.wizard = this.getAncestorOfType("ux.megatron.gui.SteppedWizard");
				};

				block.prototype.onNext = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
					return null;
				};

				block.prototype.onPrev = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
					return null; // return "NONE" to not advance panels
				};

				block.prototype.onRevert = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
					return null; // return "NONE" to not last status
				};

				block.prototype.onCancel = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
					return null; // return "NONE" to not advance panels
				};

				block.prototype.onFinish = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL){
					//alert(this.wizard.cacheCDF.step2);
					if(this.checkInput()) {
						var _data = this.paneMaster.getData();
/* @JSC :: begin DEBUG */
						jsx3.log("BaseInfo#onNext : current data step1: " + this.wizard.cacheCDF.step1);
						jsx3.log("BaseInfo#onNext : current data step2: " + this.wizard.cacheCDF.step2);
						jsx3.log("BaseInfo#onNext : current data : " + _data);
/* @JSC :: end */
						//var cdf = jsx3.xml.CDF.Document.newDocument();
						if(this.wizard.cacheCDF.step3) 
							delete this.wizard.cacheCDF.step3;
                        this.wizard.cacheCDF.step3 = _data;
						//alert(this.wizard.cacheCDF.step3);
/* @JSC :: begin DEBUG */
						jsx3.log("BaseInfo#onNext : current cacheData step3 : " + this.wizard.cacheCDF.step3);
/* @JSC :: end */
						
						//var cdfAttrs = cdf.getFirstChild().getAttributes();
						//var __data = cdfAttrs.toString();
						var __data = this.getDataArray();
						//alert(typeof(__data) + ' : ' + __data);
						__data = (new Function("return [{" + __data + "}];"))();
/* @JSC :: begin DEBUG */
						jsx3.log('type of data[' + (__data instanceof Array ? 'Array' : typeof(__data)) + '] : ' + __data[0].regionCode);
/* @JSC :: end */ 
						//return;
						ux.megatron.util.Dwr.callDwr("SchoolInfoUCC","saveSchoolInfo",__data,this,
							function(data){
								if (data != null && typeof data == 'object') 
									alert(dwr.util.toDescriptiveString(data, 2));
								else 
									dwr.util.setValue('d0', dwr.util.toDescriptiveString(data, 1));
								this.getAncestorOfType("ux.cdb.admin.system.school.builder.Builder").onClose();
							});
						//TODO: get and cache current data,used to transaction processing.
						//return null; // return "NONE" to not advance panels
                    } else {
                        return "NONE";
                    }
				};

				block.prototype.onCustomNav = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
					return null; // return "NONE" to not advance panels
				};

				block.prototype.onBeforeShow = function(objWIZARD, objBUTTON, objEVENT, strLASTPANEL) {
					if(!this.getChild(0)) {
						var me = this;
						ux.megatron.Main.loadUIResourceAsync(me, "ux.cdb.admin","ux/cdb/admin/system/school/builder/step3/ui/bankInfoContent.xml", me, me.initialize);
					}
					return null; // return "NONE" to not advance panels
				};

				block.prototype.onAfterHide = function(objWIZARD, objBUTTON, objEVENT, strNEXTPANEL) {
					return null; // return "NONE" to not advance panels
				};
				
				block.prototype.initialize = function() {
                    this.wizard = this.getAncestorOfType("ux.megatron.gui.SteppedWizard");
					/* if(!this.wizard.cacheCDF || !this.wizard.cacheCDF.step3){ //cache of steps.
						this.wizard.cacheCDF = { step3 : null};
					} */
                    this.paneMaster = this.get("blkBaseInfo");
                    //if(this.wizard.cacheCDF) this.detail.setData(this.wizard.cacheCDF);
                };
				
				block.prototype.checkInput = function() {
/* @JSC :: begin DEBUG */
					jsx3.log("BankInfo#checkInput");
/* @JSC :: end */
                    var validater = this.paneMaster.doValidate();
                    if(validater == null) {
/* @JSC :: begin DEBUG */
						jsx3.log("BankInfo#checkInput success!");
/* @JSC :: end */
                        this.wizard.getMessageLabel().setText("&nbsp;");
                        return true;
                    } else {
/* @JSC :: begin DEBUG */
						jsx3.log("BankInfo#checkInput failed!");
/* @JSC :: end */
                        var tip = ux.megatron.Main.getServer().getDynamicProperty("@cdb@system@schoolBuilder@schoolInfoValidaeMSG");
                        this.wizard.getMessageLabel().setText(tip);
                        return false;
                    }
                };
				
				block.prototype.getDataArray = function() {
					var attrArray = [];
					var step1Itor = this.wizard.cacheCDF.step1.selectNodeIterator("//record");
					var step2Itor = this.wizard.cacheCDF.step2.selectNodeIterator("//record");
					var step3Itor = this.wizard.cacheCDF.step3.selectNodeIterator("//record");
					while(step1Itor.hasNext()){
						var node = step1Itor.next();
						var attrNames = node.getAttributeNames();
						for(var i = 0;i < attrNames.length;i++){
							var attr = node.getAttribute(attrNames[i]);
							//alert(attrNames[i] + " : " + attr)
							//cdf.getFirstChild().setAttribute(attrNames[i],attr);
							attrArray.push(attrNames[i] + ': "' + attr + '"');
						}
					}
					while(step2Itor.hasNext()){
						var node = step2Itor.next();
						var attrNames = node.getAttributeNames();
						for(var i = 0;i < attrNames.length;i++){
							var attr = node.getAttribute(attrNames[i]);
							attrArray.push(attrNames[i] + ': "' + attr + '"');
						}
					}
					while(step3Itor.hasNext()){
						var node = step3Itor.next();
						var attrNames = node.getAttributeNames();
						for(var i = 0;i < attrNames.length;i++){
							var attr = node.getAttribute(attrNames[i]);
							attrArray.push(attrNames[i] + ': "' + attr + '"');
						}
					}
					return attrArray.join();
				};
			}
	);
}
